package com.itheima.entity;

import com.itheima.vo.RoleInfoVO;
import com.itheima.vo.RoleVO;
import lombok.Data;

import java.time.LocalDateTime;

@Data
public class SysRole {
    private String id;
    private String name;
    private String description;
    private LocalDateTime createDate;
    private LocalDateTime updateDate;
    private String remarks;
    private char delFlag;
    private int superadmin;
    private String defaultData;
    public RoleVO transformRoleVO(){
        RoleVO roleVO = new RoleVO();
        roleVO.setId(this.id);
        roleVO.setName(this.name);
        roleVO.setDescription(this.description);
        roleVO.setCreate_date(this.createDate);
        roleVO.setUpdate_date(this.updateDate);
        roleVO.setRemarks(this.remarks);
        roleVO.setDel_flag(this.delFlag);
        roleVO.setSuperadmin(this.superadmin);
        roleVO.setDefault_data(this.defaultData);
        return roleVO;
    }
    public RoleInfoVO transformRoleInfoVO(){
        RoleInfoVO roleInfoVO = new RoleInfoVO();
        roleInfoVO.setId(this.id);
        roleInfoVO.setName(this.name);
        roleInfoVO.setDescription(this.description);
        roleInfoVO.setCreate_date(this.createDate);
        roleInfoVO.setUpdate_date(this.updateDate);
        roleInfoVO.setRemarks(this.remarks);
        roleInfoVO.setDel_flag(this.delFlag);
        roleInfoVO.setSuperadmin(this.superadmin);
        roleInfoVO.setDefault_data(this.defaultData);
        //roleInfoVO.setAuthList();
        return roleInfoVO;
    }
}
